﻿using IT_RoadBlock.Controls;
using IT_RoadBlock.Dto;
using IT_RoadBlock.Entities;
using IT_RoadBlock.ViewModes;
using HandyControl.Controls;

namespace IT_RoadBlock
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class ProjectEditWindow : HandyControl.Controls.GlowWindow
    {
        public ProjectEditWindow(TProjectInfo projectInfo)
        {
            InitializeComponent();
            this.allGrid.Children.Add(new ProjectDetailUserControl(projectInfo));
            this.DataContext = new ProjectEditViewModel(projectInfo)
            {
                CloseWindow = () => this.Close(),
                DialogWindow = (win,rs) =>
                {
                    Dialog dialog = Dialog.Show(new TextDialog(win,rs));
                }
            };
    }
    }
}
